/**
 *Project: SSHDemo2013
 *File: cn.xkshow.demo.dao.hibernate.UniversalDao.java 
 *Author: hardy(admin@xkshow.cn) Copyright
 ****************************************************************
 *   VERSION       DATE            BY       CHANGE/COMMENT
 * --------------------------------------------------------------
 *    1.0        2013-5-30         hardy         create
 ****************************************************************
 *note:
 ***************************************************************/ 
package cn.xkshow.demo.dao.hibernate;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

@Repository
public class UniversalDao extends HibernateDaoSupport{

	public void save(Object entity) {
		// TODO Auto-generated method stub
		this.getHibernateTemplate().save(entity);
	}
	
	public void saveOrUpdate(Object entity) {
		// TODO Auto-generated method stub
		this.getHibernateTemplate().saveOrUpdate(entity);
	}
	
	public void delete(Object entity) {
		// TODO Auto-generated method stub
		this.getHibernateTemplate().delete(entity);
	}
	
	public Object getEntity(String entity, Object eid) {
		// TODO Auto-generated method stub
		return this.getHibernateTemplate().get(entity, eid.toString());
	}
	
}
